package org.igeek.atomqq.domain;

/**
 * qq好友
 * @author 作者 E-mail:hangxin1940@gmail.com
 * @version 创建时间：2011-7-29 下午11:47:24
 */
public class Friend extends FriendInfo implements Comparable<Friend> {
	

	private long flag;
	

	/**
	 * 分组
	 */
	private int category;
	
	
	/**
	 * 备注名称
	 */
	private String markname;
	
	/**
	 * 是否会员
	 */
	private int vip;
	
	/**
	 * 会员等级
	 */
	private int vip_level;
	
	/**
	 * 头像
	 */
	private String face;
	
	/**
	 * 刚刚上线
	 */
	private int justOnline;
	
	
	
	
	//个性签名
	private String lnick;
	
	private String status;
	
	private int isOnline;

	private int newMessage;
	
	public Friend(long uin) {
		super(uin);
		
		justOnline=0;
		newMessage=0;
		isOnline=0;
		
	}

	public int getCategory() {
		return category;
	}

	public void setCategory(int category) {
		this.category = category;
	}

	public String getMarkname() {
		return markname;
	}

	public void setMarkname(String markname) {
		this.markname = markname;
	}

	public int getVip() {
		return vip;
	}

	public void setVip(int vip) {
		this.vip = vip;
	}

	public int getVip_level() {
		return vip_level;
	}

	public void setVip_level(int vip_level) {
		this.vip_level = vip_level;
	}

	public String getFace() {
		return face;
	}

	public void setFace(String face) {
		this.face = face;
	}

	public String getNick() {
		return nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public String getLnick() {
		return lnick;
	}

	public void setLnick(String lnick) {
		this.lnick = lnick;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public int getClient_type() {
		return client_type;
	}

	public void setClient_type(int client_type) {
		this.client_type = client_type;
	}

	public int isOnline() {
		return isOnline;
	}

	public void setOnline(int isOnline) {
		this.isOnline = isOnline;
	}

	public int hasNewMessage() {
		return newMessage;
	}

	public void setNewMessage(int newMessage) {
		this.newMessage = newMessage;
	}
	
	public void setFriendInfo(FriendInfo info){
		super.uin =info.uin;
		super.birthday=info.birthday;
		super.phone=info.phone;
		super.allow=info.allow;
		super.constel=info.constel;
		super.college=info.college;
		super.blood =info.blood;
		super.homepage =info.homepage;
		super.stat =info.stat;
		super.vip_info =info.vip_info;
		super.country =info.country;
		super.city =info.city;
		super.personal =info.personal;
		super.nick =info.nick;
		super.shengxiao =info.shengxiao;
		super.email=info.email;
		super.client_type =info.client_type;
		super.province =info.province;
		super.mobile =info.mobile;
		super.gender =info.gender;
		super.occupation =info.occupation;
	}

	public void setFlag(long flag) {
		this.flag = flag;
	}

	public long getFlag() {
		return flag;
	}

	public void setJustOnline(int justOnline) {
		this.justOnline = justOnline;
	}

	public int isJustOnline() {
		return justOnline;
	}

	@Override
	public int compareTo(Friend another) {
		int message=hasNewMessage()-another.hasNewMessage();
		int just=justOnline-another.justOnline;
		int online=isOnline-another.isOnline;
		
		if(message!=0)
			return message==1?-1:1;
		
		if(just!=0)
			return just==1?-1:1;
		
		if(online!=0)
			return online==1?-1:1;

		
		return 0;
	}
	

}
